package com.tanhua.dubbo.api.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.domain.mongo.TestSoul;
import com.tanhua.dubbo.api.TestSoulApi;
import com.tanhua.dubbo.mapper.TestSoulMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(timeout = 100000)
public class TestSoulApiImpl implements TestSoulApi {

    @Autowired
    private TestSoulMapper testSoulMapper;

    /**
     * 查询测灵魂的列表 错了 这里是查mysql的
     *
     * @return
     */
    @Override
    public List<TestSoul> findByTestSoulList() {
        QueryWrapper<TestSoul> wrapper = new QueryWrapper<>();
        // 没有条件就是查询全部 就10道题 不用分页了 前端也没说要分页
        List<TestSoul> testSoulList = testSoulMapper.selectList(wrapper);
        return testSoulList;
    }
}
